/*
 * This source code is part of TWaver 4.0
 *
 * Serva Software PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 * Copyright 2002 - 2011 Serva Software. All rights reserved.
 */

package demo.network.miscellaneous.customlink;

import java.awt.Point;
import java.awt.geom.GeneralPath;

import twaver.Link;
import twaver.network.TNetwork;
import twaver.network.ui.LinkUI;

public class CustomLinkUI extends LinkUI {

	public CustomLinkUI(TNetwork network, Link link) {
		super(network, link);
	}
	
	public GeneralPath getPath() {
		GeneralPath customPath = new GeneralPath();
		Point p1 = this.getFromPoint();
		Point p2 = this.getToPoint();
		customPath.moveTo(p1.x, p1.y);
		customPath.quadTo((p1.x + p2.x) / 2, (p1.y + p2.y) / 2 + 300, p2.x, p2.y);
		return customPath;
	}
}